Update a Product
To update an existing warehouse product, you can make a PATCH request to the /warehouse/v1/products/{id} endpoint. The PATCH route contains a path parameter: id which will be the ID returned from the POST request made previously. The same rules apply when creating or updating a product with the exception that LP currently does not allow some fields such as product attributes to be updated.
Any fields provided on the payload will be updated to the new value provided. If a field is not included, it will remain in its original state. If the product is successfully updated, you will receive a 200 OK status code back with the complete data of the product.
Please see below for a sample request and response body.
Example Request
PATCH /warehouse/v1/products/{your_id} HTTP/1.1
x-api-key: your_api_key
organization-slug: your_organization_slug (if required)
Content-Type: application/json
{
"productDescription": "description",
"productUnit": "UNT",
"unitPrice": "22.00",
"unitPriceCurrency": "USD",
"dimHeight": 0.1,
"dimWidth": 0.1,
"dimDepth": 0.1,
"dimUnit": "IN",
"weightPerProduct": 0.1,
"weightPerProductUnit": "LB",
"clientProductCode": "string",
"clientProductDescription": "string",
"clientProductUnit": "UNT"
}
Example Response
{
"data": {
"id": "{YourIdReturnedHere}",
"productCode": "ExampleProduct-1234",
"productDescription": "description",
"productUnit": "UNT",
"unitPrice": "22.00",
"unitPriceCurrency": "USD",
"productAttributes": [],
"customFields": [],
"dimHeight": 0.1,
"dimWidth": 0.1,
"dimDepth": 0.1,
"dimUnit": "IN",
"weightPerProduct": 0.1,
"weightPerProductUnit": "LB",
"clientProductCode": "string",
"clientProductDescription": "string",
"clientProductUnit": "UNT",
"pickMode": "ASP"
},
"id": "e8ea2c17-7049-453e-85a0-1e542e38160a",
"resource": [],
"errors": []
}